package com.ly.controller;

import com.ly.pojo.PromotionSpace;
import com.ly.service.PromotionSpaceService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/promotionSpace")
@CrossOrigin
public class PromotionSpaceController {
    @Autowired
    private PromotionSpaceService promotionSpaceService;

    @GetMapping("/findAll")
    public List<PromotionSpace> findAll(){
        List<PromotionSpace> all = promotionSpaceService.findAll();
        return all;
    }

}
